package com.test.project_test.test.interfaces.controller;

import com.test.project_test.test.domain.PageDTO;
import com.test.project_test.test.infrastructure.mysql.po.User;
import com.test.project_test.test.interfaces.facade.UserFacadeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Duan SanMao
 * @date 2021/9/1
 */

@RestController
@RequestMapping("/user")
@Api(value = "前端用户控制器", tags = "Duan sanmao")
public class UserController {

    @Resource
    private UserFacadeService userFacadeService;

    @GetMapping("/userList")
    @ApiOperation(value = "用户列表",notes = "duansanmao")
    public PageDTO<User> userList(Integer state) {

        return userFacadeService.userList(state);
    }


}
